package DBLayer;

import org.junit.Test;


public class ConnectionDBTest {

    @Test
    public void testGetInstance() throws Exception {

        ConnectionDB dbConn = ConnectionDB.getInstance();

        if(dbConn != null) {
            System.out.println("Connection to database - Success");
        }
        else {
            System.out.println("Failed to connect to database");
        }

    }

    @Test
    public void testCloseConnection() throws Exception {
        ConnectionDB.closeConnection();
    }

    @Test
    public void testStartTransation() throws Exception {
        ConnectionDB.startTransation();

    }

    @Test
    public void testCommitTransation() throws Exception {
        ConnectionDB.commitTransation();
    }

    @Test
    public void testRollbackTransation() throws Exception {
        ConnectionDB.rollbackTransation();

    }
}
